package dk.boller;

import org.apache.mina.core.future.ConnectFuture;
import org.apache.mina.core.service.IoConnector;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.transport.serial.SerialAddress;
import org.apache.mina.transport.serial.SerialConnector;

/**
 * Created by IntelliJ IDEA.
 * User: flemming
 * Date: 7/3/12
 * Time: 9:39 PM
 * To change this template use File | Settings | File Templates.
 */
public class DebugIO {
    public static void main(String[] args) throws InterruptedException {
        IoConnector ioConnector = new SerialConnector();

        SerialAddress portAddress =
                new SerialAddress("com3", 19200, SerialAddress.DataBits.DATABITS_8, SerialAddress.StopBits.BITS_1, SerialAddress.Parity.NONE, SerialAddress.FlowControl.NONE);

        ConnectFuture future  = ioConnector.connect(portAddress);
        future.await();

        IoSession session = future.getSession();



    }
}
